home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsIHttpProtocolHandler.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  15KB  |  379 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIHttpProtocolHandler.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIHttpProtocolHandler_h__
  6. #define __gen_nsIHttpProtocolHandler_h__
  7.  
  8.  
  9. #ifndef __gen_nsIProxiedProtocolHandler_h__
  10. #include "nsIProxiedProtocolHandler.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIHttpProtocolHandler */
  19. #define NS_IHTTPPROTOCOLHANDLER_IID_STR "122c91c0-2485-40ba-89c9-b895934921bc"
  20.  
  21. #define NS_IHTTPPROTOCOLHANDLER_IID \
  22.   {0x122c91c0, 0x2485, 0x40ba, \
  23.     { 0x89, 0xc9, 0xb8, 0x95, 0x93, 0x49, 0x21, 0xbc }}
  24.  
  25. class NS_NO_VTABLE nsIHttpProtocolHandler : public nsIProxiedProtocolHandler {
  26.  public: 
  27.  
  28.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IHTTPPROTOCOLHANDLER_IID)
  29.  
  30.   /**
  31.      * Get the HTTP advertised user agent string.
  32.      */
  33.   /* readonly attribute ACString userAgent; */
  34.   NS_IMETHOD GetUserAgent(nsACString & aUserAgent) = 0;
  35.  
  36.   /**
  37.      * Get the application name.
  38.      *
  39.      * @return The name of this application (eg. "Mozilla").
  40.      */
  41.   /* readonly attribute ACString appName; */
  42.   NS_IMETHOD GetAppName(nsACString & aAppName) = 0;
  43.  
  44.   /**
  45.      * Get the application version string.
  46.      *
  47.      * @return The complete version (major and minor) string. (eg. "5.0")
  48.      */
  49.   /* readonly attribute ACString appVersion; */
  50.   NS_IMETHOD GetAppVersion(nsACString & aAppVersion) = 0;
  51.  
  52.   /**
  53.      * @return The vendor name.
  54.      */
  55.   /* attribute ACString vendor; */
  56.   NS_IMETHOD GetVendor(nsACString & aVendor) = 0;
  57.   NS_IMETHOD SetVendor(const nsACString & aVendor) = 0;
  58.  
  59.   /**
  60.      * @return The vendor sub string.
  61.      */
  62.   /* attribute ACString vendorSub; */
  63.   NS_IMETHOD GetVendorSub(nsACString & aVendorSub) = 0;
  64.   NS_IMETHOD SetVendorSub(const nsACString & aVendorSub) = 0;
  65.  
  66.   /**
  67.      * @return The vendor comment.
  68.      */
  69.   /* attribute ACString vendorComment; */
  70.   NS_IMETHOD GetVendorComment(nsACString & aVendorComment) = 0;
  71.   NS_IMETHOD SetVendorComment(const nsACString & aVendorComment) = 0;
  72.  
  73.   /**
  74.      * @return The product name.
  75.      */
  76.   /* attribute ACString product; */
  77.   NS_IMETHOD GetProduct(nsACString & aProduct) = 0;
  78.   NS_IMETHOD SetProduct(const nsACString & aProduct) = 0;
  79.  
  80.   /**
  81.      * @return A product sub string.
  82.      */
  83.   /* attribute ACString productSub; */
  84.   NS_IMETHOD GetProductSub(nsACString & aProductSub) = 0;
  85.   NS_IMETHOD SetProductSub(const nsACString & aProductSub) = 0;
  86.  
  87.   /**
  88.      * @return A product comment.
  89.      */
  90.   /* attribute ACString productComment; */
  91.   NS_IMETHOD GetProductComment(nsACString & aProductComment) = 0;
  92.   NS_IMETHOD SetProductComment(const nsACString & aProductComment) = 0;
  93.  
  94.   /**
  95.      * Get the current platform.
  96.      *
  97.      * @return The platform this application is running on
  98.      *           (eg. "Windows", "Macintosh", "X11")
  99.      */
  100.   /* readonly attribute ACString platform; */
  101.   NS_IMETHOD GetPlatform(nsACString & aPlatform) = 0;
  102.  
  103.   /**
  104.      * Get the current oscpu.
  105.      *
  106.      * @return The oscpu this application is running on
  107.      */
  108.   /* readonly attribute ACString oscpu; */
  109.   NS_IMETHOD GetOscpu(nsACString & aOscpu) = 0;
  110.  
  111.   /**
  112.      * Get the translation of the application. The value for language
  113.      * is usually a 2-letter code such as "en" and occasionally a 
  114.      * five-character code to indicate a language subtype, such as "zh_CN". 
  115.      */
  116.   /* attribute ACString language; */
  117.   NS_IMETHOD GetLanguage(nsACString & aLanguage) = 0;
  118.   NS_IMETHOD SetLanguage(const nsACString & aLanguage) = 0;
  119.  
  120.   /**
  121.      * Get/Set the application comment misc portion.
  122.      */
  123.   /* attribute ACString misc; */
  124.   NS_IMETHOD GetMisc(nsACString & aMisc) = 0;
  125.   NS_IMETHOD SetMisc(const nsACString & aMisc) = 0;
  126.  
  127. };
  128.  
  129. /* Use this macro when declaring classes that implement this interface. */
  130. #define NS_DECL_NSIHTTPPROTOCOLHANDLER \
  131.   NS_IMETHOD GetUserAgent(nsACString & aUserAgent); \
  132.   NS_IMETHOD GetAppName(nsACString & aAppName); \
  133.   NS_IMETHOD GetAppVersion(nsACString & aAppVersion); \
  134.   NS_IMETHOD GetVendor(nsACString & aVendor); \
  135.   NS_IMETHOD SetVendor(const nsACString & aVendor); \
  136.   NS_IMETHOD GetVendorSub(nsACString & aVendorSub); \
  137.   NS_IMETHOD SetVendorSub(const nsACString & aVendorSub); \
  138.   NS_IMETHOD GetVendorComment(nsACString & aVendorComment); \
  139.   NS_IMETHOD SetVendorComment(const nsACString & aVendorComment); \
  140.   NS_IMETHOD GetProduct(nsACString & aProduct); \
  141.   NS_IMETHOD SetProduct(const nsACString & aProduct); \
  142.   NS_IMETHOD GetProductSub(nsACString & aProductSub); \
  143.   NS_IMETHOD SetProductSub(const nsACString & aProductSub); \
  144.   NS_IMETHOD GetProductComment(nsACString & aProductComment); \
  145.   NS_IMETHOD SetProductComment(const nsACString & aProductComment); \
  146.   NS_IMETHOD GetPlatform(nsACString & aPlatform); \
  147.   NS_IMETHOD GetOscpu(nsACString & aOscpu); \
  148.   NS_IMETHOD GetLanguage(nsACString & aLanguage); \
  149.   NS_IMETHOD SetLanguage(const nsACString & aLanguage); \
  150.   NS_IMETHOD GetMisc(nsACString & aMisc); \
  151.   NS_IMETHOD SetMisc(const nsACString & aMisc); 
  152.  
  153. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  154. #define NS_FORWARD_NSIHTTPPROTOCOLHANDLER(_to) \
  155.   NS_IMETHOD GetUserAgent(nsACString & aUserAgent) { return _to GetUserAgent(aUserAgent); } \
  156.   NS_IMETHOD GetAppName(nsACString & aAppName) { return _to GetAppName(aAppName); } \
  157.   NS_IMETHOD GetAppVersion(nsACString & aAppVersion) { return _to GetAppVersion(aAppVersion); } \
  158.   NS_IMETHOD GetVendor(nsACString & aVendor) { return _to GetVendor(aVendor); } \
  159.   NS_IMETHOD SetVendor(const nsACString & aVendor) { return _to SetVendor(aVendor); } \
  160.   NS_IMETHOD GetVendorSub(nsACString & aVendorSub) { return _to GetVendorSub(aVendorSub); } \
  161.   NS_IMETHOD SetVendorSub(const nsACString & aVendorSub) { return _to SetVendorSub(aVendorSub); } \
  162.   NS_IMETHOD GetVendorComment(nsACString & aVendorComment) { return _to GetVendorComment(aVendorComment); } \
  163.   NS_IMETHOD SetVendorComment(const nsACString & aVendorComment) { return _to SetVendorComment(aVendorComment); } \
  164.   NS_IMETHOD GetProduct(nsACString & aProduct) { return _to GetProduct(aProduct); } \
  165.   NS_IMETHOD SetProduct(const nsACString & aProduct) { return _to SetProduct(aProduct); } \
  166.   NS_IMETHOD GetProductSub(nsACString & aProductSub) { return _to GetProductSub(aProductSub); } \
  167.   NS_IMETHOD SetProductSub(const nsACString & aProductSub) { return _to SetProductSub(aProductSub); } \
  168.   NS_IMETHOD GetProductComment(nsACString & aProductComment) { return _to GetProductComment(aProductComment); } \
  169.   NS_IMETHOD SetProductComment(const nsACString & aProductComment) { return _to SetProductComment(aProductComment); } \
  170.   NS_IMETHOD GetPlatform(nsACString & aPlatform) { return _to GetPlatform(aPlatform); } \
  171.   NS_IMETHOD GetOscpu(nsACString & aOscpu) { return _to GetOscpu(aOscpu); } \
  172.   NS_IMETHOD GetLanguage(nsACString & aLanguage) { return _to GetLanguage(aLanguage); } \
  173.   NS_IMETHOD SetLanguage(const nsACString & aLanguage) { return _to SetLanguage(aLanguage); } \
  174.   NS_IMETHOD GetMisc(nsACString & aMisc) { return _to GetMisc(aMisc); } \
  175.   NS_IMETHOD SetMisc(const nsACString & aMisc) { return _to SetMisc(aMisc); } 
  176.  
  177. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  178. #define NS_FORWARD_SAFE_NSIHTTPPROTOCOLHANDLER(_to) \
  179.   NS_IMETHOD GetUserAgent(nsACString & aUserAgent) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUserAgent(aUserAgent); } \
  180.   NS_IMETHOD GetAppName(nsACString & aAppName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAppName(aAppName); } \
  181.   NS_IMETHOD GetAppVersion(nsACString & aAppVersion) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAppVersion(aAppVersion); } \
  182.   NS_IMETHOD GetVendor(nsACString & aVendor) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVendor(aVendor); } \
  183.   NS_IMETHOD SetVendor(const nsACString & aVendor) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVendor(aVendor); } \
  184.   NS_IMETHOD GetVendorSub(nsACString & aVendorSub) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVendorSub(aVendorSub); } \
  185.   NS_IMETHOD SetVendorSub(const nsACString & aVendorSub) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVendorSub(aVendorSub); } \
  186.   NS_IMETHOD GetVendorComment(nsACString & aVendorComment) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVendorComment(aVendorComment); } \
  187.   NS_IMETHOD SetVendorComment(const nsACString & aVendorComment) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVendorComment(aVendorComment); } \
  188.   NS_IMETHOD GetProduct(nsACString & aProduct) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProduct(aProduct); } \
  189.   NS_IMETHOD SetProduct(const nsACString & aProduct) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetProduct(aProduct); } \
  190.   NS_IMETHOD GetProductSub(nsACString & aProductSub) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProductSub(aProductSub); } \
  191.   NS_IMETHOD SetProductSub(const nsACString & aProductSub) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetProductSub(aProductSub); } \
  192.   NS_IMETHOD GetProductComment(nsACString & aProductComment) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProductComment(aProductComment); } \
  193.   NS_IMETHOD SetProductComment(const nsACString & aProductComment) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetProductComment(aProductComment); } \
  194.   NS_IMETHOD GetPlatform(nsACString & aPlatform) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPlatform(aPlatform); } \
  195.   NS_IMETHOD GetOscpu(nsACString & aOscpu) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOscpu(aOscpu); } \
  196.   NS_IMETHOD GetLanguage(nsACString & aLanguage) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLanguage(aLanguage); } \
  197.   NS_IMETHOD SetLanguage(const nsACString & aLanguage) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLanguage(aLanguage); } \
  198.   NS_IMETHOD GetMisc(nsACString & aMisc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMisc(aMisc); } \
  199.   NS_IMETHOD SetMisc(const nsACString & aMisc) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMisc(aMisc); } 
  200.  
  201. #if 0
  202. /* Use the code below as a template for the implementation class for this interface. */
  203.  
  204. /* Header file */
  205. class nsHttpProtocolHandler : public nsIHttpProtocolHandler
  206. {
  207. public:
  208.   NS_DECL_ISUPPORTS
  209.   NS_DECL_NSIHTTPPROTOCOLHANDLER
  210.  
  211.   nsHttpProtocolHandler();
  212.  
  213. private:
  214.   ~nsHttpProtocolHandler();
  215.  
  216. protected:
  217.   /* additional members */
  218. };
  219.  
  220. /* Implementation file */
  221. NS_IMPL_ISUPPORTS1(nsHttpProtocolHandler, nsIHttpProtocolHandler)
  222.  
  223. nsHttpProtocolHandler::nsHttpProtocolHandler()
  224. {
  225.   /* member initializers and constructor code */
  226. }
  227.  
  228. nsHttpProtocolHandler::~nsHttpProtocolHandler()
  229. {
  230.   /* destructor code */
  231. }
  232.  
  233. /* readonly attribute ACString userAgent; */
  234. NS_IMETHODIMP nsHttpProtocolHandler::GetUserAgent(nsACString & aUserAgent)
  235. {
  236.     return NS_ERROR_NOT_IMPLEMENTED;
  237. }
  238.  
  239. /* readonly attribute ACString appName; */
  240. NS_IMETHODIMP nsHttpProtocolHandler::GetAppName(nsACString & aAppName)
  241. {
  242.     return NS_ERROR_NOT_IMPLEMENTED;
  243. }
  244.  
  245. /* readonly attribute ACString appVersion; */
  246. NS_IMETHODIMP nsHttpProtocolHandler::GetAppVersion(nsACString & aAppVersion)
  247. {
  248.     return NS_ERROR_NOT_IMPLEMENTED;
  249. }
  250.  
  251. /* attribute ACString vendor; */
  252. NS_IMETHODIMP nsHttpProtocolHandler::GetVendor(nsACString & aVendor)
  253. {
  254.     return NS_ERROR_NOT_IMPLEMENTED;
  255. }
  256. NS_IMETHODIMP nsHttpProtocolHandler::SetVendor(const nsACString & aVendor)
  257. {
  258.     return NS_ERROR_NOT_IMPLEMENTED;
  259. }
  260.  
  261. /* attribute ACString vendorSub; */
  262. NS_IMETHODIMP nsHttpProtocolHandler::GetVendorSub(nsACString & aVendorSub)
  263. {
  264.     return NS_ERROR_NOT_IMPLEMENTED;
  265. }
  266. NS_IMETHODIMP nsHttpProtocolHandler::SetVendorSub(const nsACString & aVendorSub)
  267. {
  268.     return NS_ERROR_NOT_IMPLEMENTED;
  269. }
  270.  
  271. /* attribute ACString vendorComment; */
  272. NS_IMETHODIMP nsHttpProtocolHandler::GetVendorComment(nsACString & aVendorComment)
  273. {
  274.     return NS_ERROR_NOT_IMPLEMENTED;
  275. }
  276. NS_IMETHODIMP nsHttpProtocolHandler::SetVendorComment(const nsACString & aVendorComment)
  277. {
  278.     return NS_ERROR_NOT_IMPLEMENTED;
  279. }
  280.  
  281. /* attribute ACString product; */
  282. NS_IMETHODIMP nsHttpProtocolHandler::GetProduct(nsACString & aProduct)
  283. {
  284.     return NS_ERROR_NOT_IMPLEMENTED;
  285. }
  286. NS_IMETHODIMP nsHttpProtocolHandler::SetProduct(const nsACString & aProduct)
  287. {
  288.     return NS_ERROR_NOT_IMPLEMENTED;
  289. }
  290.  
  291. /* attribute ACString productSub; */
  292. NS_IMETHODIMP nsHttpProtocolHandler::GetProductSub(nsACString & aProductSub)
  293. {
  294.     return NS_ERROR_NOT_IMPLEMENTED;
  295. }
  296. NS_IMETHODIMP nsHttpProtocolHandler::SetProductSub(const nsACString & aProductSub)
  297. {
  298.     return NS_ERROR_NOT_IMPLEMENTED;
  299. }
  300.  
  301. /* attribute ACString productComment; */
  302. NS_IMETHODIMP nsHttpProtocolHandler::GetProductComment(nsACString & aProductComment)
  303. {
  304.     return NS_ERROR_NOT_IMPLEMENTED;
  305. }
  306. NS_IMETHODIMP nsHttpProtocolHandler::SetProductComment(const nsACString & aProductComment)
  307. {
  308.     return NS_ERROR_NOT_IMPLEMENTED;
  309. }
  310.  
  311. /* readonly attribute ACString platform; */
  312. NS_IMETHODIMP nsHttpProtocolHandler::GetPlatform(nsACString & aPlatform)
  313. {
  314.     return NS_ERROR_NOT_IMPLEMENTED;
  315. }
  316.  
  317. /* readonly attribute ACString oscpu; */
  318. NS_IMETHODIMP nsHttpProtocolHandler::GetOscpu(nsACString & aOscpu)
  319. {
  320.     return NS_ERROR_NOT_IMPLEMENTED;
  321. }
  322.  
  323. /* attribute ACString language; */
  324. NS_IMETHODIMP nsHttpProtocolHandler::GetLanguage(nsACString & aLanguage)
  325. {
  326.     return NS_ERROR_NOT_IMPLEMENTED;
  327. }
  328. NS_IMETHODIMP nsHttpProtocolHandler::SetLanguage(const nsACString & aLanguage)
  329. {
  330.     return NS_ERROR_NOT_IMPLEMENTED;
  331. }
  332.  
  333. /* attribute ACString misc; */
  334. NS_IMETHODIMP nsHttpProtocolHandler::GetMisc(nsACString & aMisc)
  335. {
  336.     return NS_ERROR_NOT_IMPLEMENTED;
  337. }
  338. NS_IMETHODIMP nsHttpProtocolHandler::SetMisc(const nsACString & aMisc)
  339. {
  340.     return NS_ERROR_NOT_IMPLEMENTED;
  341. }
  342.  
  343. /* End of implementation class template. */
  344. #endif
  345.  
  346. /**
  347.  * At initialization time, the HTTP handler will initialize each service
  348.  * registered under this category:
  349.  */
  350. #define NS_HTTP_STARTUP_CATEGORY "http-startup-category"
  351. /**
  352.  * nsIObserver notification corresponding to startup category.  Services
  353.  * registered under the startup category will receive this observer topic at
  354.  * startup if they implement nsIObserver.  The "subject" of the notification
  355.  * is the nsIHttpProtocolHandler instance.
  356.  */
  357. #define NS_HTTP_STARTUP_TOPIC "http-startup"
  358. /**
  359.  * Before an HTTP request is sent to the server, this observer topic is
  360.  * notified.  The observer of this topic can then choose to set any additional
  361.  * headers for this request before the request is actually sent to the server.
  362.  * The "subject" of the notification is the nsIHttpChannel instance.
  363.  */
  364. #define NS_HTTP_ON_MODIFY_REQUEST_TOPIC "http-on-modify-request"
  365. /**
  366.  * After an HTTP server response is received, this observer topic is notified.
  367.  * The observer of this topic can interrogate the response.  The "subject" of
  368.  * the notification is the nsIHttpChannel instance.
  369.  */
  370. #define NS_HTTP_ON_EXAMINE_RESPONSE_TOPIC "http-on-examine-response"
  371. /**
  372.  * The observer of this topic is notified after the received HTTP response
  373.  * is merged with data from the browser cache.  This means that, among other
  374.  * things, the Content-Type header will be set correctly.
  375.  */
  376. #define NS_HTTP_ON_EXAMINE_MERGED_RESPONSE_TOPIC "http-on-examine-merged-response"
  377.  
  378. #endif /* __gen_nsIHttpProtocolHandler_h__ */
  379.